reset PCI devices on force removal even when QEMU returns error
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Fri, 28 Nov 2014 16:53:09 +0000 (16:53 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 6 Jan 2015 11:15:45 +0000 (11:15 +0000)
commit8233ca53adf008da54c01d55d3309c4b0999ddb5
tree993e444eed2f8a2cabc003f73bd6352d7dee84a2
parent876367befa26b12bfdecd6697faa7b8102e4b287
reset PCI devices on force removal even when QEMU returns error

On do_pci_remove when QEMU returns error, we just bail out early without
resetting the device. On domain shutdown we are racing with QEMU exiting
and most often QEMU closes the QMP connection before executing the
requested command.

In these cases if force=1, it makes sense to go ahead with rest of the
PCI device removal, that includes resetting the device and calling
xc_deassign_device. Otherwise we risk not resetting the device properly
on domain shutdown.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl_pci.c